Modern network connections between applications running on a pair of devices will use a port to communicate data between these pair of devices. A port is an endpoint in a bidirectional communication flow across a computer network. An application communicates with a remote device through one or more ports.
While some applications can use different ports to communicate packets of different protocols, there are advantages to transmitting and receiving packets over the same port for multiple network protocols. For example, a FaceTime video call uses a single port for various signaling and media packets of different protocols. Protocols used include Session Initiation Protocol (SIP) to establish the call, Internet Connectivity Establishment (ICE) protocol to establish a session across firewall, and Real Time Protocol (RTP) to delivering real-time and encrypted media streams.
In order for different types of packets (e.g., SIP, ICE, and RTP packets) to be communicated across the same port, there is a need to differentiate the different types of packets so that a FaceTime client can appropriately process the different packet types.